package cn.edu.scau.cmi.ema.dao;

import cn.edu.scau.cmi.ema.base.CmiPagination;
import cn.edu.scau.cmi.ema.domain.Unit;
import org.springframework.dao.DataAccessException;

import java.util.Set;

public interface UnitDAO extends JpaDao<Unit> {

	public Unit findUnitById(Integer id) throws DataAccessException;

	public Unit findUnitById(Integer id, int startResult, int maxRows) throws DataAccessException;

	public Set<Unit> findUnitByName(String name) throws DataAccessException;

	public Set<Unit> findUnitByName(String name, int startResult, int maxRows) throws DataAccessException;

	public Set<Unit> findUnitByNameContaining(String name_1) throws DataAccessException;

	public Set<Unit> findUnitByNameContaining(String name_1, int startResult, int maxRows) throws DataAccessException;

	public Set<Unit> findUnitByType(String type) throws DataAccessException;

	public Set<Unit> findUnitByType(String type, int startResult, int maxRows) throws DataAccessException;

	public Set<Unit> findUnitByTypeContaining(String type_1) throws DataAccessException;

	public Set<Unit> findUnitByTypeContaining(String type_1, int startResult, int maxRows) throws DataAccessException;

	public Set<Unit> findUnitByDescription(String description) throws DataAccessException;

	public Set<Unit> findUnitByDescription(String description, int startResult, int maxRows) throws DataAccessException;

	public Set<Unit> findUnitByDescriptionContaining(String description_1) throws DataAccessException;

	public Set<Unit> findUnitByDescriptionContaining(String description_1, int startResult, int maxRows)
			throws DataAccessException;

	public Unit findUnitByPrimaryKey(Integer id) throws DataAccessException;

	public Unit findUnitByPrimaryKey(Integer id, int startResult, int maxRows) throws DataAccessException;

	public Set<Unit> findUnitsByIds(Set<Integer> ids) throws DataAccessException;

	public Set<Unit> findAllUnits() throws DataAccessException;

	public Set<Unit> findAllUnits(int startResult, int maxRows) throws DataAccessException;

	public Set<Unit> findUnitByCompositeProperities(String sql, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Unit> findUnitsByDetachedCriteria(CmiPagination page) throws DataAccessException;

	public Unit findUnitByPhysicalPrimaryKey(String name, String type) throws DataAccessException;

	public Unit findUnitByPhysicalPrimaryKey(String name, String type, int startResult, int maxRows)
			throws DataAccessException;
}
